package cn.edu.scau.cmi.zhuangjunsheng.comprehensiveExperiment;

import cn.edu.scau.cmi.zhuangjunsheng.singleton.Chairman;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.control.TextArea;

public class SingletonUI {
	
	@FXML
	private TextField tf;
	
	@FXML
	private TextArea ta;
	
	@FXML
	public void onTF(ActionEvent av) throws Exception {
		String name = tf.getText();
		Chairman cm;
		cm = Chairman.getInstance(name);
		ta.appendText("当前创建的主席为" + name + "  " + cm + "\n");
	}
	
}
